import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';

const root: HTMLElement | null = document.getElementById('root');
const names: Array<string> = ['张三', '李四', '王五'];
const elements: Array<React.ReactElement> = [];
for (let i = 0; i < names.length; ++i) {
  elements.push(<li>{names[i]}</li>);
}
ReactDOM.render(
  <ul>
    {elements}
  </ul>
  , root);
